home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ WinNT Lock File Options.xpl < prev    next >
Text File  |  1999-08-06  |  2KB  |  60 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="2"
  3. "COUNT"="2"
  4. "UIPATH"="Network\Server"
  5. "NAME"="File Lock Behavior"
  6. "VERSION"="1.0"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Retry Count"
  9. "TEXT 2"="Retry Delay"
  10. "DESCRIPTION 1"="If a user tries to open a file on this computer, and the file is locked by another user, the server retries to open the file before returning a "FILE IS ALREADY IN USE BY ANOTHER PERSON" to the user."
  11. "DESCRIPTION 2"="How often this should be done ("Retry Count") and how long the server should wait between each try ("Retry Delay") can be configured here."
  12. "DESCRIPTION 3"="To have the default values restored, clear both fields. "
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  16.  
  17.  
  18. sP="HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\"
  19. sV1="SharingViolationRetries"
  20. sV2="SharingViolationDelay"
  21. Sub Plugin_Initialize 
  22.  If GetWinVer=2 then 
  23.     i=RegReadValue(sP & sV1)
  24.     SetUIElement 1,i
  25.  
  26.     i=RegReadValue(sP & sV2)
  27.     SetUIElement 2,i
  28.  else
  29.     Disable
  30.  end if
  31. End Sub
  32.  
  33. Sub Plugin_CheckData(ElementIndex)
  34. End Sub
  35.  
  36. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  37.  Call SetVal(sP & sV1,1)
  38.  Call SetVal(sP & sV2,2)
  39. End Sub
  40.  
  41. Sub SetVal(PAT,IDX)
  42.  i=GetUIElement(IDX)
  43.  if i="" then
  44.     'Delete Value   
  45.     i=RegReadValue(PAT)
  46.  
  47.     if not isEmpty(i) then 
  48.        Call RegDeleteValue(PAT)
  49.     end if
  50.  else
  51.     'Set Value
  52.     Call RegWriteValue(PAT,i,2)
  53.  end if
  54. End Sub
  55.  
  56.  
  57.  
  58. Sub Plugin_Terminate 
  59. End Sub
  60.